package com.zmxstudy.rbac.mapper;

import com.zmxstudy.rbac.entity.Item;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;
import java.util.List;

/**
* @author Lenovo
* @description 针对表【item】的数据库操作Mapper
* @createDate 2024-06-12 15:48:57
* @Entity com.zmxstudy.rbac.entity.Item
*/
public interface ItemMapper extends BaseMapper<Item> {
    /**
     * 查询所有商品信息
     * @return 商品信息
     */
    @Select("SELECT item_name, brand, size,image,type FROM item")
    ArrayList<Item> selectAll();

    /**
     * 根据id查询商品信息
     * @param id
     * @return item
     */
    @Select("SELECT item_name, brand_id, size,image,type FROM item WHERE id = #{id}")
    ArrayList<Item> selectItemById(String id);
}




